Model fit

Column

Assumption checks

Column

Indices of model fit

#> # Indices of model performance
#> 
#> AIC    |    BIC |    R2 | R2 (adj.) |  RMSE | Sigma
#> ---------------------------------------------------
#> 49.676 | 54.073 | 0.753 |     0.745 | 0.479 | 0.494

Parameter estimates

Column

Plot

Column

Tabular summary

#> Parameter   | Coefficient |   SE |         95% CI | t(30) |      p
#> ------------------------------------------------------------------
#> (Intercept) |        6.05 | 0.31 | [ 5.42,  6.68] | 19.59 | < .001
#> mpg         |       -0.14 | 0.01 | [-0.17, -0.11] | -9.56 | < .001

Extra

Textual summary

#> We fitted a linear model (estimated using OLS) to predict wt with mpg (formula: wt ~ mpg). The model explains a statistically significant and substantial proportion of variance (R2 = 0.75, F(1, 30) = 91.38, p < .001, adj. R2 = 0.74). The model's intercept, corresponding to mpg = 0, is at 6.05 (95% CI [5.42, 6.68], t(30) = 19.59, p < .001). Within this model:
#> 
#>   - The effect of mpg is statistically significant and negative (beta = -0.14, 95% CI [-0.17, -0.11], t(30) = -9.56, p < .001; Std. beta = -0.87, 95% CI [-1.05, -0.68])
#> 
#> Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using
---
title: "Regression model summary from `{easystats}`"
output: 
  flexdashboard::flex_dashboard:
    theme:
      version: 4
      # bg: "#101010"
      # fg: "#FDF7F7" 
      primary: "#0054AD"
      base_font:
        google: Prompt
      code_font:
        google: JetBrains Mono
    orientation: columns
    vertical_layout: fill
    out.width: "100%"
params:
  model: model
---

```{r setup, include=FALSE}
library(flexdashboard)
library(easystats)

knitr::opts_chunk$set(
  error = TRUE,
  comment = "#>"
)
```

```{r}
# Get user-specified model data
model <- params$model

table_parameters <- parameters(model)
table_performance <- performance(model)



text_report <- report(model)
```

Model fit 
=====================================  

Column {data-width=550}
-----------------------------------------------------------------------

### Assumption checks

```{r check-model, fig.height=10, fig.width=8, out.width="60%"}
check_model(model)
```

Column {data-width=450}
-----------------------------------------------------------------------

### Indices of model fit

```{r}
table_performance
```

Parameter estimates
=====================================  

Column {data-width=550}
-----------------------------------------------------------------------

### Plot

```{r dot-whisker}
plot(table_parameters)
```

Column {data-width=450}
-----------------------------------------------------------------------

### Tabular summary

```{r}
table_parameters
```

Extra {data-orientation=rows}
=====================================    

### Textual summary

```{r}
text_report
```